package com.basaji;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.mortbay.jetty.Connector;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.nio.SelectChannelConnector;
import org.mortbay.jetty.webapp.WebAppContext;

public class Jetty {

	private static Log log = LogFactory.getLog(Jetty.class);

	/**
	 * 
	 * @param args
	 * @throws Exception
	 * @throws Exception
	 * 
	 */
	public static void main(String[] args) {
		try {
			org.mortbay.jetty.Server server = new Server();
			org.mortbay.jetty.nio.SelectChannelConnector connector = new SelectChannelConnector();
			connector.setPort(9999);
			server.setConnectors(new Connector[] { connector });

			WebAppContext wah = new WebAppContext();
			wah.setContextPath("/");
			wah.setWar("webapp");
			server.addHandler(wah);

			server.start();
		} catch (Exception e) {
			log.error(e);
		}
	}
}
